<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
    <style>
        .layui-form-item .layui-input-inline {
            width: 120px;
        }
        .layui-form-label {
            padding: 9px 5px;
            width: auto;
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <input type="hidden" name="uid" value="{$uid}" id="userId">

    <div class="layui-card">
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title layui_tab_title">
                <li class=""><a href="{:url('user/backpack',array('uid'=>$uid))}">背包情况</a></li>
                <li class=""><a href="{:url('user/ticket',array('uid'=>$uid))}">发放观赛券</a></li>
                <li class=""><a href="{:url('user/give_ticket_log',array('uid'=>$uid))}">观赛券发放记录</a></li>
                <li class=""><a href="{:url('user/used_ticket_log',array('uid'=>$uid))}">观赛券用券记录</a></li>
                <li class=""><a href="{:url('order/user_order',array('uid'=>$uid))}">充值记录</a></li>
                <li class="layui-this"><a href="{:url('gift/user_send',array('uid'=>$uid))}">送礼记录</a></li>
                <li class=""><a href="{:url('charge/manual',array('uid'=>$uid))}">人工上分</a></li>
                <li class=""><a href="{:url('user/login_log',array('uid'=>$uid))}">登录日志</a></li>
            </ul>
        </div>

        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">收礼用户ID</label>
                    <div class="layui-input-inline">
                        <input type="text" name="anchorid" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">直播ID</label>
                    <div class="layui-input-inline">
                        <input type="text" name="liveid" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">时间段选择</label>
                    <div class="layui-input-inline">
                        <select name="type">
                            <option value="">不限</option>
                            <option value="1">今日</option>
                            <option value="2">昨日</option>
                            <option value="3">过去7天</option>
                            <option value="4">过去30天</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">下单时间</label>
                    <div class="layui-input-inline" style="width: 350px;">
                        <input type="text" name="start_time" placeholder="开始时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="start_time_input">
                        -
                        <input type="text" name="end_time" placeholder="截止时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="end_time_input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn layuiadmin-btn-giftsend" lay-submit lay-filter="LAY-giftsend-front-search">
                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    </button>
                </div>
            </div>
        </div>
        <div class="layui-card-body">

            <table id="LAY-gift-usersend-manage" lay-filter="LAY-gift-usersend-manage"></table>

        </div>
    </div>
</div>

<script src="/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'gift', 'table', 'laydate'], function () {
        var $ = layui.$
            , form = layui.form
            , table = layui.table
            , laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start_time_input',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input',
            type: 'datetime'
        });

        //监听搜索
        form.on('submit(LAY-giftsend-front-search)', function (data) {
            var field = data.field;

            //执行重载
            table.reload('LAY-gift-usersend-manage', {
                where: field
                , page: {
                    curr: 1   //默认从第一页开始搜索
                },
            });
        });
    });
</script>
</body>
</html>
